package cn.j229.bug.zhongxuan.eureka_service_ribbon.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author smile_ZhongXuan
 * @Date 2020/10/29 10:32
 * @Version 1.0
 */
@Configuration
public class RibbonConfiguration {
    // @LoadBalanced注解表明这个restRemplate开启负载均衡的功能
    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}

